﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="EmpRecord.aspx.cs" Inherits="Employees_EmpRecord" %>

<%@ Register Assembly="ZLTextBox" Namespace="BaseText" TagPrefix="cc1" %>
<%@ Register Src="../Control/SelUser.ascx" TagName="SelUser" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
   
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        datamember="EmpRecord" onadding="Master_Adding" >
    </infolight:webdatasource>
    <fieldset title="员工记录" style="overflow: hidden">
        <legend style="font-size: large; font-weight: bold">员工奖惩记录</legend>
        <table style="width: 100%">
            <tr>
                <td>
                    <infolight:webnavigator id="wn" runat="server" bindingobject="EmpRecord" oncommand="wnHr_Command"
                        showdatastyle="FormViewStyle" width="100%" statusstrip="WebStatusStrip1" 
                        anyqueryid="wn" CtlHeight="25" CssClass="NavigatorBar">
                        <navcontrols>
                <InfoLight:ControlItem ControlName="First" ControlText="掸" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/first.gif" MouseOverImageUrl="../image/uipics/first2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/first3.gif" />
                <InfoLight:ControlItem ControlName="Previous" ControlText="掸" ControlType="Image"
                    ControlVisible="False" ImageUrl="../image/uipics/previous.gif" MouseOverImageUrl="../image/uipics/previous2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/previous3.gif" />
                <InfoLight:ControlItem ControlName="Next" ControlText="掸" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/next.gif" MouseOverImageUrl="../image/uipics/next2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/next3.gif" />
                <InfoLight:ControlItem ControlName="Last" ControlText="ソ掸" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/last.gif" MouseOverImageUrl="../image/uipics/last2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/next3.gif" />
                    
                    
                    
                <InfoLight:ControlItem ControlName="Add" ControlText="add" ControlType="Image" ControlVisible="True"
                    DisenableImageUrl="../Image/UIPics/Add3_C.gif" ImageUrl="../Image/UIPics/Add_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Add2_C.gif" Size="48" >
                </InfoLight:ControlItem>
                 <InfoLight:ControlItem ControlName="Update" ControlText="update" ControlType="Image"
                    ControlVisible="True" DisenableImageUrl="../Image/UIPics/Edit3_C.gif" ImageUrl="../Image/UIPics/Edit_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Edit2_C.gif" Size="48">
                </InfoLight:ControlItem>
               
                <InfoLight:ControlItem ControlName="Delete" ControlText="埃" ControlType="Image"
                    ControlVisible="True" ImageUrl="../image/uipics/delete_C.gif" MouseOverImageUrl="../image/uipics/delete2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/delete3_C.gif" />
    

                    
                    
               
<InfoLight:ControlItem ControlName="Cancel" ControlType="Image" ControlVisible="True"
                    DisenableImageUrl="../Image/UIPics/Abort3_C.gif" ImageUrl="../Image/UIPics/Abort_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Abort2_C.gif" Size="48">
                </InfoLight:ControlItem>
<InfoLight:ControlItem ControlName="Apply" ControlType="Image" ControlVisible="True"
                    DisenableImageUrl="../Image/UIPics/Apply3_C.gif" ImageUrl="../Image/UIPics/Apply_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Apply2_C.gif" Size="48">
                </InfoLight:ControlItem>
                    
                    
                    
                <InfoLight:ControlItem ControlName="Abort" ControlText="斌" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/abort.gif" MouseOverImageUrl="../image/uipics/abort2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/abort3.gif" />
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/query.gif" MouseOverImageUrl="../image/uipics/query2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/query3.gif" />
                <InfoLight:ControlItem ControlName="Print" ControlText="ゴ" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/print.gif" MouseOverImageUrl="../image/uipics/print2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/print3.gif" />
                <InfoLight:ControlItem ControlName="Export" ControlType="Image" ControlVisible="False"
                    DisenableImageUrl="../Image/UIPics/Export3.gif" ImageUrl="../Image/UIPics/Export.gif"
                    MouseOverImageUrl="../Image/UIPics/Export2.gif" Size="25" />
            </navcontrols>
                        <navstates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </navstates>
                    </infolight:webnavigator>
                    <infolight:webformview id="EmpRecord" runat="server" datasourceid="Master" width="100%"
                        cellpadding="4" ondatabound="EmpRecord_DataBound">
                        <edititemtemplate>
                <table class="tbE" cellpadding="5">
             <tr>
                 <td class="label1">
                    记录编号：
                 </td>
                 <td class="readonly">
                     <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("EmpRecordID") %>' 
                         ReadOnly="True"></asp:TextBox>
                 </td>
                 <td class="label2">
                     员工(<span style="color: Red">*</span>)：
                 </td>
                 <td class="textbox">
                   <uc2:SelUser ID="SelUser" runat="server" />
                 </td>
                 </tr>
                 <tr>
                     
                     <td class="label1">
                        记录类型：
                     </td>
                     <td class="textbox">
                        <InfoLight:WebDropDownList ID="EmpRecordClass" runat="server" 
                                        AutoInsertEmptyData="False" DataSourceID="wdsRecordType" DataTextField="Rname" 
                                        DataValueField="Rid" DriverObject="" Filter="" FilterObject="" 
                                        onlyshowselecttext="False" SelectedValue='<%# Bind("EmpRecordClass") %>'>
                                    </InfoLight:WebDropDownList>
                     </td>
                      <td class="label2">
                        记录日期(<span style="color: Red">*</span>)：
                     </td>
                     <td class="textbox">
                     <asp:TextBox ID="TextBox21" runat="server" 
                             onfocus="WdatePicker({dateFmt:'yyyy-M-d'})" 
                             Text='<%# Bind("EmpRecordDate", "{0:d}") %>' CssClass="Wdate"/></asp:TextBox>
                 </tr>
                 <tr>
                     <td class="label1">
                        记录描述(<span style="color: Red">*</span>)：
                     </td>
                     <td class="textbox" colspan="3">
                         <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("EmpRecordNotes") %>' 
                             TextMode="MultiLine"></asp:TextBox>
                     </td>
                 </tr>   
               </table>
            </edititemtemplate>
                        <insertitemtemplate>
                 
            <table class="tbI" cellpadding="5">
             <tr>
                 <td class="label1">
                    记录编号：
                 </td>
                 <td class="readonly">
                     <asp:TextBox ID="EmpRecordID" runat="server" Text='<%# Bind("EmpRecordID") %>' 
                         ReadOnly="True"></asp:TextBox>
                 </td>
                 <td class="label2">
                     员工(<span style="color: Red">*</span>)：
                 </td>
                 <td class="textbox">
                   <uc2:SelUser ID="SelUser" runat="server" />
                 </td>
                 </tr>
                 <tr>
                     
                     <td class="label1">
                        记录类型：
                     </td>
                     <td class="textbox">
                        <InfoLight:WebDropDownList ID="EmpRecordClass" runat="server" 
                                        AutoInsertEmptyData="False" DataSourceID="wdsRecordType" DataTextField="Rname" 
                                        DataValueField="Rid" DriverObject="" Filter="" FilterObject="" 
                                        onlyshowselecttext="False" 
                             SelectedValue='<%# Bind("EmpRecordClass") %>'>
                                    </InfoLight:WebDropDownList>
                     </td>
                      <td class="label2">
                        记录日期(<span style="color: Red">*</span>)：
                     </td>
                     <td class="textbox">
                     <asp:TextBox ID="EmpRecordDate" runat="server" 
                             onfocus="WdatePicker({dateFmt:'yyyy-M-d'})" 
                             Text='<%# Bind("EmpRecordDate", "{0:d}") %>' CssClass="Wdate"/></asp:TextBox>

                     </td>
                 </tr>
                 <tr>
                     <td class="label1">
                        记录描述(<span style="color: Red">*</span>)：
                     </td>
                     <td class="textbox" colspan="3">
                         <asp:TextBox ID="EmpRecordNotes" runat="server" Text='<%# Bind("EmpRecordNotes") %>' 
                             TextMode="MultiLine"></asp:TextBox>
                     </td>
                 </tr>   
               </table>
            </insertitemtemplate>
                        <itemtemplate>
                <table class="tbR" cellpadding="5">
             <tr>
                 <td class="label1">
                    记录编号：
                 </td>
                 <td class="readonly">
                     <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("EmpRecordID") %>' 
                         ReadOnly="True"></asp:TextBox>
                 </td>
                 <td class="label2">
                     员工：
                 </td>
                 <td class="textbox">
                 <uc2:SelUser ID="SelUser" runat="server" />
                 </td>
                 </tr>
                 <tr>
                     
                     <td class="label1">
                        记录类型：
                     </td>
                     <td class="textbox">
                        <InfoLight:WebDropDownList ID="EmpRecordClass" runat="server" 
                                        AutoInsertEmptyData="False" DataSourceID="wdsRecordType" DataTextField="Rname" 
                                        DataValueField="Rid" DriverObject="" Filter="" FilterObject="" 
                                        onlyshowselecttext="True" 
                             SelectedValue='<%# Bind("EmpRecordClass") %>'>
                                    </InfoLight:WebDropDownList>
                     </td>
                      <td class="label2">
                        记录日期：
                     </td>
                     <td class="textbox">
                     <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("EmpRecordDate", "{0:d}") %>'/></asp:TextBox>

                     </td>
                 </tr>
                 <tr>
                     <td class="label1">
                        记录描述：
                     </td>
                     <td class="textbox" colspan="3">
                         <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("EmpRecordNotes") %>' 
                             TextMode="MultiLine"></asp:TextBox>
                     </td>
                 </tr>   
               </table>
            </itemtemplate>
                        <fields>
                <InfoLight:FormViewField ControlID="EmployeeID" 
                    FieldName="EmployeeID" />
                <InfoLight:FormViewField ControlID="EmpRecordID" 
                    FieldName="EmpRecordID" />
                <InfoLight:FormViewField ControlID="EmpRecordClass" 
                    FieldName="EmpRecordClass" />
                <InfoLight:FormViewField ControlID="EmpRecordNotes" 
                    FieldName="EmpRecordNotes" />
                <InfoLight:FormViewField ControlID="EmpRecordDate" 
                    FieldName="EmpRecordDate" />
                
            </fields>
                    </infolight:webformview>
                </td>
            </tr>
        </table>
    </fieldset>
    <br />
    <br />
    <div style="text-align: center">
        <span class="roundbtn" runat="server" id="spHistory">
            <asp:LinkButton ID="LinkButton1" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;返  回&nbsp;&nbsp;&nbsp;&nbsp;"
                OnClick="LinkButton1_Click"></asp:LinkButton>
        </span>
    </div>
    <infolight:webdatasource id="wdsEmp" runat="server" selectalias="Usasdb" selectcommand="select EmployeeId,EmpName from Employees">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsRecordType" runat="server" selectalias="Usasdb" selectcommand="select ValueName as Rname,ValueId as Rid from Employees_LinkValue where TypeId='EmpRecord'">
    </infolight:webdatasource>
    <infolight:webdefault id="wdEmpRecord" runat="server" defaultactive="True" datasourceid="Master"
        datamember="EmpRecord" carryonactive="False">
        <fields>
            <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="EmployeeID"></InfoLight:DefaultFieldItem>
            <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="EmpRecordID"></InfoLight:DefaultFieldItem>
            <InfoLight:DefaultFieldItem DefaultValue="_Today" FieldName="EmpRecordDate"></InfoLight:DefaultFieldItem>
        </fields>
    </infolight:webdefault>
    <infolight:webvalidate id="wvEmpRecord" runat="server" datasourceid="Master" datamember="EmpRecord"
        validatestyle="ShowDialog" rowcss="" altrowcss="" forecolor="Red">
        <fields>
            <InfoLight:ValidateFieldItem CheckNull="True" FieldName="EmpRecordDate"></InfoLight:ValidateFieldItem>
            <InfoLight:ValidateFieldItem CheckNull="True" FieldName="EmpRecordNotes"></InfoLight:ValidateFieldItem>
        </fields>
    </infolight:webvalidate>
    <asp:HiddenField ID="hidEid" runat="server" />
    <asp:HiddenField ID="hidEname" runat="server" />
</asp:Content>
